package com.zf.museum.service;

import com.zf.museum.bean.Question;
import com.zf.museum.bean.Result;
import com.zf.museum.model.User;

import javax.servlet.http.HttpServletRequest;
import java.util.Set;

public interface UserService {

    /**
     * 登录
     * @param name
     * @param openId
     * @return
     */
    Result login(String name, String openId);

    /**
     * 修改昵称
     * @param name
     * @param openId
     * @return
     */
    Result updateName(String name, String openId);

    /**
     * 根据openId获取用户
     * @param openId
     * @return
     */
    User getUserByOpenId(String openId);

    /**
     * 获取前十名
     * @param openId
     * @return
     */
    Set<User> getTop10User(String openId);

    /**
     * 评判答题情况
     * @param question
     * @return
     */
    Result judge(Question question);
}
